#define BOOST_FILESYSTEM_VERSION 3

#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
#  define BOOST_FILESYSTEM_NO_DEPRECATED
#endif
#ifndef BOOST_SYSTEM_NO_DEPRECATED
#  define BOOST_SYSTEM_NO_DEPRECATED
#endif

#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/progress.hpp>

using namespace std;
namespace fs = boost::filesystem;

#ifndef LSFILE_H_
#define LSFILE_H_

class Lsfile {
protected:
	ofstream ofile;
	ifstream iffile;
	string strfrom;
	string strto;
	fs::path from;
	fs::path to;
	vector<string> insidepath;
	string fromls; //name of file where ls is
	string tols;
	vector <string> fromfile;
	vector <string> tofile;
	vector<double> size;
	void clear_file(fs::path where, const char name[]);
	void create_ls(fs::path where, const char name[], fs::path main);
	void createlsvect();
public:
	Lsfile(){}
	Lsfile(string strfrom, string strto) :
			strfrom(strfrom), strto(strto){
			from = fs::path(strfrom);
			from = fs::system_complete(from);
			to = fs::path(strto);
			to = fs::system_complete(to);
	}

	virtual ~Lsfile();
	bool ispath();

	void createAll_ls(const char fstr[], const char tstr[]);

	//getery setery
	vector<double> getSize() const {
		return size;
	}

	vector<string> getFromfile() const {
		return fromfile;
	}

	vector<string> getTofile() const {
		return tofile;
	}

	fs::path getFrom() const {
		return from;
	}

	void setFrom(fs::path from) {
		this->from = from;
	}

	string getStrfrom() const {
		return strfrom;
	}

	void setStrfrom(string strfrom) {
		this->strfrom = strfrom;
	}

	string getStrto() const {
		return strto;
	}

	void setStrto(string strto) {
		this->strto = strto;
	}

	fs::path getTo() const {
		return to;
	}

	void setTo(fs::path to) {
		this->to = to;
	}

	string getFromls() const {
		return fromls;
	}

	void setFromls(string fromls) {
		this->fromls = fromls;
	}

	string getTols() const {
		return tols;
	}

	void setTols(string tols) {
		this->tols = tols;
	}
};

#endif /* LSFILE_H_ */
